package cn.zxy.tokenx.autoconfigure;

import cn.zxy.tokenx.config.WebConfig;
import cn.zxy.tokenx.properties.TokenXProperties;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;

//                                                  zxy.tokenx.enable = false
@ConditionalOnProperty(prefix = TokenXProperties.TOKENX_PREFIX,value = "enable",havingValue = "true",matchIfMissing = true)
@Import(WebConfig.class)
public class TokenXAutoConfiguration {

//    这种方式也可以 = @Import(WebConfig.class)

//    @Bean
//    public WebConfig addWebConfig(){
//        return new WebConfig();
//    }
}
